		<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" type="text/css" href="_js/grid/gt_grid.css" />
		<link rel="stylesheet" type="text/css" href="_js/grid/skin/vista/skinstyle.css" />
		<link href="_css/Demo.css" rel="stylesheet" type="text/css" media="all" />
	    <link href="_css/datepicker.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="_js/grid/gt_msg_en.js"></script>
		<script type="text/javascript" src="_js/grid/gt_grid_all.js"></script>
		<script type="text/javascript" src="_js/grid/flashchart/fusioncharts/FusionCharts.js"></script>
		<script type="text/javascript" src="_js/grid/calendar/calendar.js"></script>
		<script type="text/javascript" src="_js/grid/calendar/calendar-setup.js"></script>	
		<?php if (isset($_POST['region'])) { ?> 
		<script type="text/javascript" >
		
var grid_demo_id = "myGrid1" ;


var dsOption= {

	fields :[
		{name : 'Id_Commande'  },
		{name : 'Date_fin_Liv'  },
		{name : 'Etat'  },
		{name : 'GLN_Entrepot'},
		{name : 'GLN_Client_Liv' },
		{name : 'prix'},
		{name : 'Operations'}
			],
	recordType : 'array'
}

var colsOption = [
     {id: 'Id_Commande' , header: "N&#176" , width :30  },
	 {id: 'Date_fin_Liv' , header: "Date livraison" , width :90  },
	 {id: 'Etat' , header: "Etat" , width :70  },
	 {id: 'GLN_Entrepot' , header: "Entrepot" , width :60},
	 {id: 'GLN_Client_Liv' , header: "Client" , width :40},
	 {id: 'prix' , header: "Prix livraison" , width:80},
	 {id: 'Operations' , header: "Op&eacute;rations", width : 63},
];


var gridOption={
	id : grid_demo_id,
	loadURL : "_fct/Transporteur/CommandeController.php",
	width: 437,//"100%", // 700,
	height: 250,//"100%", // 330,
	container : 'gridbox', 
	replaceContainer : true, 
	encoding : 'UTF-8', // Sigma.$encoding(), 
	dataset : dsOption ,
	columns : colsOption ,
	skin: "vista",
	pageSize:100,
	toolbarContent : 'reload',
parameters : {'region':"<?php echo $_POST['region']; ?>", 'datemin':"<?php echo $_POST['datemin']; ?>", 'datemax':"<?php echo $_POST['datemax']; ?>"},
};

var mygrid=new Sigma.Grid( gridOption );
Sigma.Util.onLoad(function(){mygrid.render()});
</script>
	<?php } ?>
	<script type="text/javascript">
	function MkOffre(Id)
	 {
	 	 var montant = prompt("Veuillez indiquer le montant de la livraison :")
	 	 if (montant != null && montant != '')
	  		{
				document.forms["form1"].prix.value= montant;
				document.forms["form1"].action = "<?php echo ABS_PATH.ROOT; ?>?page=Transporteur/offre&fct=Transporteur/offre&idcom="+Id+"&action=valider";
				document.forms["form1"].submit();
	  		}
	  	else
	   	alert("Montant invalide !");
	 }
	</script>
	<form method="post" name="form1">
	Date de disponibilites : <br/>
	entre le : <input type="text" name="datemin" class="w8em dateformat-Y-ds-m-ds-d range-low-today" id="dp" <?php if (isset($_POST['datemin'])) { ?> value="<?php echo $_POST['datemin']?>" <?php } ?> /> et le <input type="text" class="w8em dateformat-Y-ds-m-ds-d range-low-today" id="dp-2" name="datemax" <?php if (isset($_POST['datemax'])) { ?> value="<?php echo $_POST['datemax']?>" <?php } ?>/><br />
	Region : <select name="region" id="region">
			<?php foreach ($region AS $res) { ?>
				<option value="<?php echo $res['region']; ?>" <?php if (isset($_POST['region']) && ($_POST['region'] == $res['region'])) { ?> selected="selected" <?php } ?>><?php echo $res['region']; ?></option>
			<?php } ?>
			</select> <br />
			<input type="button" value="Rechercher offres" onclick="document.forms['form1'].action='<?php echo ABS_PATH.ROOT; ?>?page=Transporteur/offre&fct=Transporteur/offre'; this.form.submit();"/>
	   		<input type="hidden" name="prix" />
	<?php if (isset($_POST['region'])) { ?>
		<div id="bigbox" style="margin:15px;display:!none;">
		<div id="gridbox" style="border:0px solid #cccccc;background-color:#f3f3f3;padding:5px;height:200px;width:700px;" ></div>
    	</div>
    <?php } ?>
    </form>
